package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import service.UserService;
import entity.User;

@Controller
@RequestMapping("/user/")
public class UserController {
	@Autowired
	private UserService us;
	@RequestMapping("login")
	public String login(User user){
		User u=us.login(user);
		if(u!=null){
			return "main";
		}else{
			return "login";
		}
	}
}
